"""
-*- coding: utf-8 -*-
@Time    : 2021/4/14 19:20
@Author  : Hu
@Email   : 624611978@qq.com
@File    : hty.py
"""
import random
import string

try:
    count = int(input("请输入要生成优惠券的数量："))
except:
    print("您输入的不是正整数！")
else:
    for i in range(count):
        coupon = ""
        for j in range(32):
            a = random.choice(string.ascii_letters[26:]+string.digits) #string.ascii_letters是a-Z,[26:]代表从A-Z
            coupon += a
        print(f"优惠券{i+1}：{coupon}")